/*
    SUSAN® - Sole of Unix Save ANything

      Copyright (C) 2011-2016 Skyatlas Co. LTD

   

   
*/

#ifndef BAREOS_SRC_DIRD_RUN_HOUR_VALIDATOR_H_
#define BAREOS_SRC_DIRD_RUN_HOUR_VALIDATOR_H_

namespace directordaemon {

struct DateTimeBitfield;

class RunHourValidator {
 public:
  RunHourValidator(time_t time);
  void PrintDebugMessage(int debuglevel) const;
  bool TriggersOn(const DateTimeBitfield& date_time_bitfield);
  time_t Time() const { return time_; }

 private:
  int hour_{0};
  int mday_{0};
  int wday_{0};
  int month_{0};
  int wom_{0};
  int woy_{0};
  int yday_{0};
  time_t time_{0};
  bool is_last_week_{false};
};

}  // namespace directordaemon

#endif  // BAREOS_SRC_DIRD_RUN_HOUR_VALIDATOR_H_
